﻿@model ABCTile.Models.Contract

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Contract</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.customerID)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.customerID)
            @Html.ValidationMessageFor(model => model.customerID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ownerID)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ownerID)
            @Html.ValidationMessageFor(model => model.ownerID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.spec_section)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.spec_section)
            @Html.ValidationMessageFor(model => model.spec_section)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.agreement_number)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.agreement_number)
            @Html.ValidationMessageFor(model => model.agreement_number)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.agreement_date)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.agreement_date, new { id = "datePicker1" })
            @Html.ValidationMessageFor(model => model.agreement_date)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.customer_job_number)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.customer_job_number)
            @Html.ValidationMessageFor(model => model.customer_job_number)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.prime_contract_number)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.prime_contract_number)
            @Html.ValidationMessageFor(model => model.prime_contract_number)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.contract_amount)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.contract_amount)
            @Html.ValidationMessageFor(model => model.contract_amount)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.job_start_date)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.job_start_date, new { id = "datePicker2" })
            @Html.ValidationMessageFor(model => model.job_start_date)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.job_end_date)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.job_end_date, new { id = "datePicker3" })
            @Html.ValidationMessageFor(model => model.job_end_date)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.division_id)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.division_id)
            @Html.ValidationMessageFor(model => model.division_id)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.comment)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.comment)
            @Html.ValidationMessageFor(model => model.comment)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
<script type="text/javascript">

    $(document).ready(function () {
        $("#datePicker1").datepicker();
        $("#datePicker2").datepicker();
        $("#datePicker3").datepicker();
        $('button, :submit').button().css('float', 'left').css('margin', '5px');
    });
</script>